package com.fowo.api.sys.cns;

import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.util.List;

/**
 * 变更通知数据
 * @author yl_ls
 */
@JsonInclude(JsonInclude.Include.NON_EMPTY)
@Getter
@Setter
public class ChangeNoticeData implements Serializable {
    public static final int TYPE_BATCH_ALL = 0;
    public static final int TYPE_BATCH = 1;
    public static final int TYPE_INSERT = 2;
    public static final int TYPE_UPDATE = 3;
    public static final int TYPE_REMOVE = 4;

    /**
     * 变更的对象名
     */
    private String objectName;

    /**
     * 变更类型
     */
    private int type = TYPE_BATCH_ALL;

    /**
     * 新增的键列表
     */
    private List<Long> insertKeys;

    /**
     * 更新的键列表
     */
    private List<Long> updateKeys;

    /**
     * 删除的键列表
     */
    private List<Long> removeKeys;
}
